[SYNCOPE-1921] Separate membership attribute on __ACCOUNT__ and ldapGroups attribute for connector#1159
[SYNCOPE-1921] Separate membership attribute on __ACCOUNT__ and ldapGroups attribute for connector#1159markusokon wants to merge 4 commits intoapache:masterfrom
Conversation
|
Hi @markusokon please open an issue on JIRA to illustrate what issue this PR is going to solve. Also, unless you have already contributed to other ASF projects, please submit your ICLA https://www.apache.org/licenses/contributor-agreements.html#clas |
|
@markusokon any update? |
|
Hi @ilgrosso it's currently under discussion if this code also requires a CCLA to be signed and I will give you an update ASAP. |
|
Hi @markusokon it's been about a month since last update: please let us know if there is any news, thanks. |
|
Sorry for keeping you waiting, it took a bit longer than expected. I just sent the ICLA and CCLA to secretary@apache.org and requested a JIRA account to open the issue. |
ilgrosso
left a comment
There was a problem hiding this comment.
I'd suggest to perform at least a full build by simple
mvn -T 1C clean install
from the root folder.
.../org/apache/syncope/core/provisioning/java/propagation/LDAPMembershipPropagationActions.java
Outdated
Show resolved
Hide resolved
|
@markusokon you have a checkstyle error:
|
|
@markusokon as you can see, the following integration test is failing: PropagationTaskITCase.issueSYNCOPE1473:835 expected: <2> but was: <1> |
|
@markusokon do you have any news to fix the failing integration test? |
|
@markusokon no feedback for 2 weeks: shall we close this PR? |
Currently LDAPMembershipPropagationActions uses the same attribute for writing the result into the propagation data and fetching the preexisting group memberships of the user object in LDAP. This leads to the beforeObj.getAttributeByName() call never returning any groups in the default case and therefore Syncope trying to edit groups it doesn't own/control.
This is fixed in this pull request by separating the attribute name used into one which the connector receives, containing all the group memberships after the execution, and the attribute name which is used to get all current memberships from the LDAP object.
Furthermore I added a performance optimization by searching for the groups managed by Syncope only once and not potentially hundreds of times.